package com.pj.control;


import com.pj.api.ProductApi;
import com.pj.entity.ProductInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductController implements ProductApi {

    @Override
    public ProductInfo findbyId(String bizId) {
        System.out.println("--------------------------通过bizId查询产品信息-bizId:"+bizId);
        ProductInfo productInfo = new ProductInfo();
        productInfo.setBizId(bizId);
        productInfo.setName("小李");
        return productInfo;
    }

    @Override
    public ProductInfo page(String name) {
        System.out.println("--------------------------分页查询产品信息-name:"+name);
        ProductInfo productInfo = new ProductInfo();
        productInfo.setName(name);
        return productInfo;
    }

    @Override
    public ProductInfo list(String name) {
        System.out.println("--------------------------列表查询产品信息-name:"+name);
        ProductInfo productInfo = new ProductInfo();
        productInfo.setBizId("1");
        productInfo.setName(name);
        return productInfo;
    }
}
